package com.qimu.saiyou.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qimu.saiyou.model.dto.competeexam.CompeteExamQueryRequest;
import com.qimu.saiyou.model.dto.useranswer.UserPaperAnswerRequest;
import com.qimu.saiyou.model.entity.CompeteExam;
import com.qimu.saiyou.model.entity.User;
import com.qimu.saiyou.model.entity.UserPaper;
import com.qimu.saiyou.model.vo.UserPaperVo;

/**
* @author: FeiXiang
* @description 针对表【compete_exam(考试)】的数据库操作Service
* @createDate 2024-02-28 20:36:14
*/
public interface CompeteExamService extends IService<CompeteExam> {

    void validCompeteExam(CompeteExam competeExam, boolean b);

    QueryWrapper<CompeteExam> getQueryWrapper(CompeteExamQueryRequest competeExamQueryRequest);

    UserPaper startTheExam(User loginUser, CompeteExam competeExam);

    boolean saveAnswer(User loginUser, UserPaperAnswerRequest userPaperAnswerRequest);

    UserPaperVo submitPaper(User loginUser, UserPaperAnswerRequest userPaperAnswerRequest);
}
